package refactor.extractsuperclass.original;

import java.util.List;

public class Department {
    private String name;
    private List<Employee> staff;

    public String getName() {
        return name;
    }

    public List<Employee> getStaff() {
        return staff;
    }

    public int getTotalAnnualCost() {
        int result = 0;
        for (Employee employee : staff) {
            result += employee.getAnnualCost();
        }
        return result;
    }

    public void addStaff(Employee employee) {
        staff.add(employee);
    }
}
